﻿// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>Vecen.BangChuang</Solution>
// <Project>Vecen.BangChuang.Core</Project>
// <FileName>UserAddress.cs</FileName>
// <CreateTime>2017-04-27 22:51</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-27 22:51" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Vecen.BangChuang.Authorization.Users;

namespace Vecen.BangChuang.BangChuang.Mall {

    /// <summary>
    /// 用户地址
    /// </summary>
    [Table("UserAddresses")]
    public class UserAddress: Entity {

        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 用户
        /// </summary>
        [ForeignKey(nameof(UserId))]
        public virtual User User { get; set; }

        /// <summary>
        /// 城市ID
        /// </summary>
        public long AreaCode { get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        public string Address { get; set; }


        /// <summary>
        /// 联系电话
        /// </summary>
        public string ContactPhone { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string ContacterName { get; set; }

        /// <summary>
        /// 是否默认
        /// </summary>
        public bool IsDefault { get; set; }
    }
}